﻿<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="PagingBarControl.ascx.vb" Inherits="LinhKienMayTinh.PagingBarControl" %>
<%If TotalPage > 1 Then%>
<div class="paging-bar">
<%If CurrentPage > 1 Then%>
<a class="paging-bar-item" href="<%= resolveurl(Url & "page-" & CStr(CurrentPage - 1)) %>">&lt;</a>
<%End If%>
<%
    For i As Integer = 1 To TotalPage
        If i = CurrentPage Then
%>
    <div class="paging-bar-item-current"><%= i%></div>    
    <%
    Else        
    %>
    <a class="paging-bar-item" href="<%= ResolveUrl(Url & "page-" & CStr(i)) %>"><%= i %></a>
<%
End If
Next
%>
<%If CurrentPage < TotalPage Then%>
<a class="paging-bar-item" href="<%= resolveurl(Url & "page-" & CStr(CurrentPage + 1)) %>">&gt;</a>
<%End If%>
</div>
<%End If%>